Optimal. Leaf size=72 \[ \frac {a^2 \cos ^3(e+f x)}{3 f}-\frac {a (a-2 b) \cos (e+f x)}{f}+\frac {b (2 a-b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4133, 448} \[ \frac {a^2 \cos ^3(e+f x)}{3 f}-\frac {a (a-2 b) \cos (e+f x)}{f}+\frac {b (2 a-b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 448
Rule 4133
Rubi steps
\begin {align*} \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^3(e+f x) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (1-x^2\right ) \left (b+a x^2\right )^2}{x^4} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (a (a-2 b)+\frac {b^2}{x^4}+\frac {(2 a-b) b}{x^2}-a^2 x^2\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {a (a-2 b) \cos (e+f x)}{f}+\frac {a^2 \cos ^3(e+f x)}{3 f}+\frac {(2 a-b) b \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.44, size = 83, normalized size = 1.15 \[ \frac {\sec ^3(e+f x) \left (-3 \left (11 a^2-64 a b+16 b^2\right ) \cos (2 (e+f x))+a^2 \cos (6 (e+f x))-26 a^2-6 a (a-4 b) \cos (4 (e+f x))+168 a b-16 b^2\right )}{96 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 67, normalized size = 0.93 \[ \frac {a^{2} \cos \left (f x + e\right )^{6} - 3 \, {\left (a^{2} - 2 \, a b\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.40, size = 97, normalized size = 1.35 \[ \frac {6 \, a b \cos \left (f x + e\right )^{2} - 3 \, b^{2} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} + \frac {a^{2} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{11} \cos \left (f x + e\right ) + 6 \, a b f^{11} \cos \left (f x + e\right )}{3 \, f^{12}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.89, size = 125, normalized size = 1.74 \[ \frac {-\frac {a^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a b \left (\frac {\sin ^{4}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )\right )+b^{2} \left (\frac {\sin ^{4}\left (f x +e \right )}{3 \cos \left (f x +e \right )^{3}}-\frac {\sin ^{4}\left (f x +e \right )}{3 \cos \left (f x +e \right )}-\frac {\left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 67, normalized size = 0.93 \[ \frac {a^{2} \cos \left (f x + e\right )^{3} - 3 \, {\left (a^{2} - 2 \, a b\right )} \cos \left (f x + e\right ) + \frac {3 \, {\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.14, size = 66, normalized size = 0.92 \[ \frac {\frac {\frac {b^2}{3}+{\cos \left (e+f\,x\right )}^2\,\left (2\,a\,b-b^2\right )}{{\cos \left (e+f\,x\right )}^3}+\frac {a^2\,{\cos \left (e+f\,x\right )}^3}{3}-a\,\cos \left (e+f\,x\right )\,\left (a-2\,b\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________